package com.ruoyi.car.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 支付记录（支付页、支付成功页）对象 t_pay_record
 * 
 * @author yby
 * @date 2025-09-01
 */
public class PayRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 支付记录ID */
    private Long id;

    /** 关联订单编号（t_purchase_order.order_no） */
    @Excel(name = "关联订单编号", readConverterExp = "t=_purchase_order.order_no")
    private String orderNo;

    /** 支付金额（元） */
    @Excel(name = "支付金额", readConverterExp = "元=")
    private BigDecimal payAmount;

    /** 支付方式（微信支付/支付宝） */
    @Excel(name = "支付方式", readConverterExp = "微=信支付/支付宝")
    private String payType;

    /** 支付状态：0-待支付，1-支付成功，2-支付失败 */
    @Excel(name = "支付状态：0-待支付，1-支付成功，2-支付失败")
    private Long payStatus;

    /** 第三方支付流水号（微信/支付宝返回） */
    @Excel(name = "第三方支付流水号", readConverterExp = "微=信/支付宝返回")
    private String tradeNo;

    /** 支付成功时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付成功时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setPayAmount(BigDecimal payAmount) 
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() 
    {
        return payAmount;
    }

    public void setPayType(String payType) 
    {
        this.payType = payType;
    }

    public String getPayType() 
    {
        return payType;
    }

    public void setPayStatus(Long payStatus) 
    {
        this.payStatus = payStatus;
    }

    public Long getPayStatus() 
    {
        return payStatus;
    }

    public void setTradeNo(String tradeNo) 
    {
        this.tradeNo = tradeNo;
    }

    public String getTradeNo() 
    {
        return tradeNo;
    }

    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("payAmount", getPayAmount())
            .append("payType", getPayType())
            .append("payStatus", getPayStatus())
            .append("tradeNo", getTradeNo())
            .append("payTime", getPayTime())
            .toString();
    }
}
